﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Newtonsoft.Json;
using RMM.Core.Entity.Shops;
using RMM.Evaluates.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RMM.ShopAppService.Dtos
{
    [AutoMap(typeof(Shop))]
    public class ShopDto : EntityDto<long>
    {
        public ShopDto()
        {
            EvaluateCates = new List<string>();
        }

        /// <summary>
        /// 现价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 店家名称
        /// </summary>
        public string ShopName { get; set; }

        [JsonIgnore]
        public DateTime _OpenBeginTime { get; set; }

        [JsonIgnore]
        public DateTime _OpenEndTime { get; set; }


        /// <summary>
        /// 开始营业时间
        /// </summary>
        public string OpenBeginTime
        {
            get
            {
                return _OpenBeginTime.ToString("hh:mm:ss");
            }
            set
            {
                value = _OpenBeginTime.ToString("hh:mm:ss");
            }
        }
        
        /// <summary>
        /// 结束营业时间
        /// </summary>
        public string OpenEndTime
        {
            get
            {
                return _OpenEndTime.ToString("hh:mm:ss");
            }
            set
            {
                value = _OpenEndTime.ToString("hh:mm:ss");
            }
        }

        /// <summary>
        /// 店铺地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 评价个数
        /// </summary>
        public int EvaluateNum { get; set; }

        /// <summary>
        /// 评价标签
        /// </summary>
        public List<string> EvaluateCates { get; set; }

        /// <summary>
        /// 纬度
        /// </summary>
        public double Latitude { get; set; }

        /// <summary>
        /// 精度
        /// </summary>
        public double Longitude { get; set; }

        /// <summary>
        /// 评价
        /// </summary>
        public EvaluateDto Evaluate { get; set; }

        /// <summary>
        /// 平局分
        /// </summary>
        public double MOS { get; set; }

        /// <summary>
        /// 预约个数
        /// </summary>
        public int MakeNum { get; set; }

        
        /// <summary>
        /// 距离 米
        /// </summary>
        public int rice { get; set; }
    }
}
